import request from '/@/utils/request'

// 供应商 场地/酒店接口
const apiText = 'supplier_site'

// 查
export function getSupplierPlaceApi(params: any) {
  return request({
    url: `/api/${apiText}/list`,
    method: 'get',
    params,
  })
}

// 详情
export function getSupplierPlaceDetailsApi(id: any) {
  return request({
    url: `/api/${apiText}/info/${id}`,
    method: 'get',
  })
}

// 增
export function addSupplierPlaceApi(data: any) {
  return request({
    url: `/api/${apiText}/create`,
    method: 'post',
    data,
  })
}

// 改
export function editSupplierPlaceApi(data: any) {
  return request({
    url: `/api/${apiText}/update/${data.id}`,
    method: 'put',
    data,
  })
}

// 删
export function delSupplierPlaceApi(id: any) {
  return request({
    url: `/api/${apiText}/delete/${id}`,
    method: 'delete',
  })
}

// 删 房间
export function delSupplierPlaceRoomApi(id: any) {
  return request({
    url: `/api/${apiText}/room/${id}`,
    method: 'delete',
  })
}
